﻿namespace RPG1
{
    public class Weapon
    {
        private string name;    // 名称
        private int type;   // 类型
        private int grade;  // 等级
        private int atk;    // 攻击力
        private int defense;    // 防御力
        private int luck;   // 幸运值

        public Weapon() { }

        public Weapon(string name, int type, int grade, int atk, int defense, int luck) {
            this.name = name;
            this.type = type;
            this.grade = grade;
            this.atk = atk;
            this.defense = defense;
            this.luck = luck;
        }
        public string Name { get => name; set => name = value; }
        public int Type { get => type; set => type = value; }
        public int Grade { get => grade; set => grade = value; }
        public int Atk { get => atk; set => atk = value; }
        public int Defense { get => defense; set => defense = value; }
        public int Luck { get => luck; set => luck = value; }
        public override string ToString()
        {
            return "{名称:"+Name+", 类型:"+Type+", 等级:"+Grade+", 攻击力:"+Atk+", 防御力:"+Defense+", 幸运值"+Luck+"}";
        }
    }
}
